package com.spi.soconversion.base.definition;

import com.spi.soconversion.util.SOCConstants;
import com.spi.soconversion.util.SOCUtility;
import com.spi.soconversion.util.XMLAttributeConstants;
import com.spi.soconversion.util.XMLTagConstants;

public class SOCOrderLineExtn {
	
	private String extnAmtCollected;
	private String extnGiftRegNum;	
	private String extnGiftRegLineNum;
	private String extnPOSTxnNum;
	private String extnPOSStoreNum;
	private String extnPOSRegNum;
	private String extnPOSProvince;
	private String extnPOSTenderDT;
	private String extnDCDropOffFlag = SOCConstants.FLAG_N;
	private String extnWarrantySku;
	private String extnIsOpenBoxItem;
	private String extnTaxProvince;


	public void setExtnIsOpenBoxItem(String extnIsOpenBoxItem) {
		this.extnIsOpenBoxItem = extnIsOpenBoxItem;
	}

	public String getExtnIsOpenBoxItem() {
		return extnIsOpenBoxItem;
	}

	public void setExtnWarrantySku(String extnWarrantySku) {
		this.extnWarrantySku = extnWarrantySku;
	}

	public String getExtnWarrantySku() {
		return SOCUtility.checkNull(extnWarrantySku);
	}

	public String getExtnDCDropOffFlag() {
		return extnDCDropOffFlag;
	}

	public void setExtnPOSProvince(String extnPOSPronvince) {
		this.extnPOSProvince = extnPOSPronvince;
	}

	public String getExtnPOSProvince() {
		return SOCUtility.checkNull(extnPOSProvince);
	}

	public void setExtnPOSRegNum(String extnPOSRegNum) {
		this.extnPOSRegNum = extnPOSRegNum;
	}

	public String getExtnPOSRegNum() {
		return SOCUtility.checkNull(extnPOSRegNum);
	}

	public void setExtnPOSStoreNum(String extnPOSStoreNum) {
		this.extnPOSStoreNum = extnPOSStoreNum;
	}

	public String getExtnPOSStoreNum() {
		return SOCUtility.checkNull(extnPOSStoreNum);
	}

	public void setExtnPOSTxnNum(String extnPOSTxnNum) {
		this.extnPOSTxnNum = extnPOSTxnNum;
	}

	public String getExtnPOSTxnNum() {
		return SOCUtility.checkNull(extnPOSTxnNum);
	}

	public void setExtnGiftRegLineNum(String extnGiftRegLineNum) {
		this.extnGiftRegLineNum = extnGiftRegLineNum;
	}

	public String getExtnGiftRegLineNum() {
		return SOCUtility.checkNull(extnGiftRegLineNum);
	}

	public void setExtnGiftRegNum(String extnGiftRegNum) {
		this.extnGiftRegNum = extnGiftRegNum;
	}

	public String getExtnGiftRegNum() {
		return SOCUtility.checkNull(extnGiftRegNum);
	}

	public void setExtnAmtCollected(String extnAmtCollected) {
		this.extnAmtCollected = extnAmtCollected;
	}

	public String getExtnAmtCollected() {
		return SOCUtility.checkNull(extnAmtCollected);
	}

	public void setExtnTaxProvince(String extnTaxProvince) {
		this.extnTaxProvince = extnTaxProvince;
	}

	public String getExtnTaxProvince() {
		return SOCUtility.checkNull(extnTaxProvince);
	}

	public void setExtnPOSTenderDT(String extnPOSTenderDT) {
		this.extnPOSTenderDT = extnPOSTenderDT;
	}

	public String getExtnPOSTenderDT() {
		return SOCUtility.checkNull(extnPOSTenderDT);
	}
	
	@Override
	public String toString()
	{
		StringBuilder sb = new StringBuilder();

		sb.append(XMLTagConstants.START_TAG_EXTN);
		sb.append(SOCConstants.BLANK_STRING);

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_AMT_COLLECTED,getExtnAmtCollected()));
		sb.append(SOCConstants.BLANK_STRING);

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_GIFT_REGISTRY_NUM,getExtnGiftRegNum()));
		sb.append(SOCConstants.BLANK_STRING);		

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_GIFT_REGISTRY_LINE_NUM, getExtnGiftRegLineNum()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_POS_TXN_NUM, getExtnPOSTxnNum()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_POS_STORE_NUM,getExtnPOSStoreNum()));
		sb.append(SOCConstants.BLANK_STRING);		

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_POS_REG_NUM, getExtnPOSRegNum()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_POS_PROVINCE, getExtnPOSProvince()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_TAX_PROVINCE, getExtnTaxProvince()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_POS_TENDER_DT, getExtnPOSTenderDT()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_DC_DROP_OFF_FLAG,getExtnDCDropOffFlag()));
		sb.append(SOCConstants.BLANK_STRING);
		
		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_WARRANTY_SKU,getExtnWarrantySku()));
		sb.append(SOCConstants.BLANK_STRING);		

		sb.append(SOCUtility.getAttribute(XMLAttributeConstants.EXTN_OPEN_BOX_ITEM, getExtnIsOpenBoxItem()));
		sb.append(SOCConstants.BLANK_STRING);
		
		
		sb.append(SOCConstants.CLOSING_XML_TAG);
		sb.append(SOCConstants.NEW_LINE);
		sb.append(XMLTagConstants.END_TAG_EXTN);

		return sb.toString();
	}
}
